﻿//IT eBooks API Info Library. Simple .Net library to access the IT eBooks API Info http://it-ebooks-api.info/
//Copyright (C) 2014 Italo Pessoa <italo.pessoa@hotmail.com>

//This file is part of the program IT eBooks API Info Library.

//IT eBooks API Info Library is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ITeBooks.API.Library.Model
{
    /// <summary>
    /// Class to set the query paremeters
    /// </summary>
    public class EBookQuery
    {
        #region Private Members

        private string _query;
        private int? _page;
        private bool _loadImagens;
        private long? _bookID;

        #endregion

        #region Constructors

        /// <summary>
        /// Create a new query
        /// </summary>
        public EBookQuery()
        {

        }

        /// <summary>
        /// Create a new query
        /// </summary>
        /// <param name="query">Query values</param>
        /// <param name="loadImages">If true the library load the images in a object</param>
        public EBookQuery(string query, bool loadImages)
        {
            this._query = query;
            this._loadImagens = loadImages;
        }

        /// <summary>
        /// Create a new query
        /// </summary>
        /// <param name="bookID">Id of the book</param>
        /// <param name="loadImages">If true the library load the images in a object</param>
        public EBookQuery(long bookID, bool loadImages)
        {
            this._bookID = bookID;
            this._loadImagens = loadImages;
        }

        /// <summary>
        /// Create a new query
        /// </summary>
        /// <param name="query">Query values</param>
        /// <param name="page">The number of the page of results</param>
        public EBookQuery(string query, int page)
        {
            this._query = query;
            this._page = page;
        }

        /// <summary>
        /// Create a new query
        /// </summary>
        /// <param name="query"Query values></param>
        /// <param name="page">The number of the page of results</param>
        /// <param name="loadImages">If true the library load the images in a object</param>
        public EBookQuery(string query, int page, bool loadImages)
        {
            this._query = query;
            this._page = page;
            this._loadImagens = loadImages;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Query string
        /// </summary>
        public string Query
        {
            get { return this._query; }
            set { this._query = value; }
        }

        /// <summary>
        /// The number of the page of the results
        /// </summary>
        public int? Page
        {
            get { return this._page; }
            set { this._page = value; }
        }

        /// <summary>
        /// If true the library load the images in a object
        /// </summary>
        public bool LoadImagens
        {
            get { return this._loadImagens; }
            set { this._loadImagens = value; }
        }

        /// <summary>
        /// ID of the book
        /// </summary>
        public long? BookID {
            get { return this._bookID; }
            set { this._bookID = value; }
        }

        #endregion
    }
}
